package com.yjd.comm.base.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.base.model.CityModel;

import java.util.List;

/**
 * <b>description</b>：城市业务接口<br>
 * <b>time</b>：2017-06-26 13:27:12 <br>
 * <b>author</b>：  yangchangyan@yijiedai.com
 */
public interface ICityService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public CityModel insert(CityModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(CityModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 查询所有regionId下面的所有三级城市id
	 *
	 * @param regionId
	 * @param ids 所有三级城市id
	 * @return
	 * @throws
	 */
	public List<Long> querySubCities(Long regionId, List<Long> ids) throws Exception;
}
